package org.example.mybatisdemo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.mybatisdemo.model.ArticleInfo;

@Mapper
public interface ArticleInfoMapper {
    @Select("select ta.id,ta.title, ta.content, ta.uid, tb.username, tb.password from articleinfo ta " +
            "left join user tb on ta.uid = tb.id " +
            "where ta.id = #{id} ")
    ArticleInfo selectArticleInfoAndUserInfo(Integer id);
}